3.2.71 \(\int \frac {a+b x^2+c x^4}{d+e x^2} \, dx\)

Optimal. Leaf size=66 \[ \frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a e^2-b d e+c d^2\right )}{\sqrt {d} e^{5/2}}-\frac {x (c d-b e)}{e^2}+\frac {c x^3}{3 e} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {1153, 205} \begin {gather*} \frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a e^2-b d e+c d^2\right )}{\sqrt {d} e^{5/2}}-\frac {x (c d-b e)}{e^2}+\frac {c x^3}{3 e} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x^2 + c*x^4)/(d + e*x^2),x]

[Out]

-(((c*d - b*e)*x)/e^2) + (c*x^3)/(3*e) + ((c*d^2 - b*d*e + a*e^2)*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*e^(5/2
))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 1153

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rubi steps

\begin {align*} \int \frac {a+b x^2+c x^4}{d+e x^2} \, dx &=\int \left (-\frac {c d-b e}{e^2}+\frac {c x^2}{e}+\frac {c d^2-b d e+a e^2}{e^2 \left (d+e x^2\right )}\right ) \, dx\\ &=-\frac {(c d-b e) x}{e^2}+\frac {c x^3}{3 e}+\frac {\left (c d^2-b d e+a e^2\right ) \int \frac {1}{d+e x^2} \, dx}{e^2}\\ &=-\frac {(c d-b e) x}{e^2}+\frac {c x^3}{3 e}+\frac {\left (c d^2-b d e+a e^2\right ) \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} e^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 65, normalized size = 0.98 \begin {gather*} \frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a e^2-b d e+c d^2\right )}{\sqrt {d} e^{5/2}}+\frac {x (b e-c d)}{e^2}+\frac {c x^3}{3 e} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^2 + c*x^4)/(d + e*x^2),x]

[Out]

((-(c*d) + b*e)*x)/e^2 + (c*x^3)/(3*e) + ((c*d^2 - b*d*e + a*e^2)*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*e^(5/2
))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a+b x^2+c x^4}{d+e x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a + b*x^2 + c*x^4)/(d + e*x^2),x]

[Out]

IntegrateAlgebraic[(a + b*x^2 + c*x^4)/(d + e*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 1.01, size = 159, normalized size = 2.41 \begin {gather*} \left [\frac {2 \, c d e^{2} x^{3} - 3 \, {\left (c d^{2} - b d e + a e^{2}\right )} \sqrt {-d e} \log \left (\frac {e x^{2} - 2 \, \sqrt {-d e} x - d}{e x^{2} + d}\right ) - 6 \, {\left (c d^{2} e - b d e^{2}\right )} x}{6 \, d e^{3}}, \frac {c d e^{2} x^{3} + 3 \, {\left (c d^{2} - b d e + a e^{2}\right )} \sqrt {d e} \arctan \left (\frac {\sqrt {d e} x}{d}\right ) - 3 \, {\left (c d^{2} e - b d e^{2}\right )} x}{3 \, d e^{3}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^4+b*x^2+a)/(e*x^2+d),x, algorithm="fricas")

[Out]

[1/6*(2*c*d*e^2*x^3 - 3*(c*d^2 - b*d*e + a*e^2)*sqrt(-d*e)*log((e*x^2 - 2*sqrt(-d*e)*x - d)/(e*x^2 + d)) - 6*(
c*d^2*e - b*d*e^2)*x)/(d*e^3), 1/3*(c*d*e^2*x^3 + 3*(c*d^2 - b*d*e + a*e^2)*sqrt(d*e)*arctan(sqrt(d*e)*x/d) -
3*(c*d^2*e - b*d*e^2)*x)/(d*e^3)]

________________________________________________________________________________________

giac [A]  time = 0.15, size = 56, normalized size = 0.85 \begin {gather*} \frac {{\left (c d^{2} - b d e + a e^{2}\right )} \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {5}{2}\right )}}{\sqrt {d}} + \frac {1}{3} \, {\left (c x^{3} e^{2} - 3 \, c d x e + 3 \, b x e^{2}\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^4+b*x^2+a)/(e*x^2+d),x, algorithm="giac")

[Out]

(c*d^2 - b*d*e + a*e^2)*arctan(x*e^(1/2)/sqrt(d))*e^(-5/2)/sqrt(d) + 1/3*(c*x^3*e^2 - 3*c*d*x*e + 3*b*x*e^2)*e
^(-3)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 84, normalized size = 1.27 \begin {gather*} \frac {c \,x^{3}}{3 e}+\frac {a \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{\sqrt {d e}}-\frac {b d \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{\sqrt {d e}\, e}+\frac {c \,d^{2} \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{\sqrt {d e}\, e^{2}}+\frac {b x}{e}-\frac {c d x}{e^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*x^4+b*x^2+a)/(e*x^2+d),x)

[Out]

1/3*c/e*x^3+1/e*b*x-c*d/e^2*x+1/(d*e)^(1/2)*a*arctan(1/(d*e)^(1/2)*e*x)-1/e/(d*e)^(1/2)*arctan(1/(d*e)^(1/2)*e
*x)*b*d+1/(d*e)^(1/2)*c*d^2/e^2*arctan(1/(d*e)^(1/2)*e*x)

________________________________________________________________________________________

maxima [A]  time = 2.41, size = 58, normalized size = 0.88 \begin {gather*} \frac {{\left (c d^{2} - b d e + a e^{2}\right )} \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{\sqrt {d e} e^{2}} + \frac {c e x^{3} - 3 \, {\left (c d - b e\right )} x}{3 \, e^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^4+b*x^2+a)/(e*x^2+d),x, algorithm="maxima")

[Out]

(c*d^2 - b*d*e + a*e^2)*arctan(e*x/sqrt(d*e))/(sqrt(d*e)*e^2) + 1/3*(c*e*x^3 - 3*(c*d - b*e)*x)/e^2

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 57, normalized size = 0.86 \begin {gather*} x\,\left (\frac {b}{e}-\frac {c\,d}{e^2}\right )+\frac {c\,x^3}{3\,e}+\frac {\mathrm {atan}\left (\frac {\sqrt {e}\,x}{\sqrt {d}}\right )\,\left (c\,d^2-b\,d\,e+a\,e^2\right )}{\sqrt {d}\,e^{5/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^2 + c*x^4)/(d + e*x^2),x)

[Out]

x*(b/e - (c*d)/e^2) + (c*x^3)/(3*e) + (atan((e^(1/2)*x)/d^(1/2))*(a*e^2 + c*d^2 - b*d*e))/(d^(1/2)*e^(5/2))

________________________________________________________________________________________

sympy [B]  time = 0.73, size = 117, normalized size = 1.77 \begin {gather*} \frac {c x^{3}}{3 e} + x \left (\frac {b}{e} - \frac {c d}{e^{2}}\right ) - \frac {\sqrt {- \frac {1}{d e^{5}}} \left (a e^{2} - b d e + c d^{2}\right ) \log {\left (- d e^{2} \sqrt {- \frac {1}{d e^{5}}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{d e^{5}}} \left (a e^{2} - b d e + c d^{2}\right ) \log {\left (d e^{2} \sqrt {- \frac {1}{d e^{5}}} + x \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x**4+b*x**2+a)/(e*x**2+d),x)

[Out]

c*x**3/(3*e) + x*(b/e - c*d/e**2) - sqrt(-1/(d*e**5))*(a*e**2 - b*d*e + c*d**2)*log(-d*e**2*sqrt(-1/(d*e**5))
+ x)/2 + sqrt(-1/(d*e**5))*(a*e**2 - b*d*e + c*d**2)*log(d*e**2*sqrt(-1/(d*e**5)) + x)/2

________________________________________________________________________________________